﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Petroleum.Model;

namespace Petroleum.UC
{
    public partial class TopControl : UserControl
    {
        public TopControl()
        {
            InitializeComponent();
        }
        int state = 0;
        public void Title(string title) 
        {
            //labTitle.Text = title;
            label1.Text = "当前步骤" + title;
        }
        private void TreeControl_Load(object sender, EventArgs e)
        {
            
        }
        
        private void btnClose_Click(object sender, EventArgs e)
        {
            this.Parent.Dispose();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            if (state == 0) {
                if (Session.ProjectId!=string.Empty) 
                {
                    labTitle.Text =string.Format( "当前项目《{0}》", Session.WellName) ;
                    state =-1;
                    timer1.Enabled = false;
                }
            }
        }
    }
}
